package com.chushouya.order.dto.api.stat;

import com.general.framework.web.annotations.Excel;
import com.chushouya.manager.constants.ClerkUserTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("每月业务员订单统计")
public class ClerkOrderMonthExport {
    @ApiModelProperty("开始日期")
    @Excel(name = "开始日期", width = 20.0)
    private String statStartDate;

    @ApiModelProperty("结束日期")
    @Excel(name = "结束日期", width = 20.0)
    private String statEndDate;

    @ApiModelProperty("业务员id")
    @Excel(name = "业务员id", width = 20.0)
    private Long clerkId;

    @ApiModelProperty("业务员名称")
    @Excel(name = "业务员名称", width = 20.0)
    private String clerkName;

    @ApiModelProperty("城市")
    @Excel(name = "城市", width = 20.0)
    private String city;

    @ApiModelProperty("业务员类型")
    private Integer userType;

    @ApiModelProperty("业务员类型")
    @Excel(name = "业务员类型", width = 20.0)
    private String userTypeText;

    @ApiModelProperty("派单数")
    @Excel(name = "派单数", width = 20.0)
    private Integer dispatchCount;

    @ApiModelProperty("完成数")
    @Excel(name = "完成数", width = 20.0)
    private Integer completeCount;

    @ApiModelProperty("发货数")
    @Excel(name = "发货数", width = 20.0)
    private Integer deliverCount;

    @ApiModelProperty("入库数")
    @Excel(name = "入库数", width = 20.0)
    private Integer stockCount;

    @ApiModelProperty("回头客数")
    @Excel(name = "回头客", width = 20.0)
    private Integer returnedCount;

    @ApiModelProperty("自建数")
    @Excel(name = "自建数", width = 20.0)
    private Integer selfCreateCount;

    @ApiModelProperty("一机多台数")
    @Excel(name = "一机多台数", width = 20.0)
    private Integer multiCount;

    @ApiModelProperty("取消数")
    @Excel(name = "取消数", width = 20.0)
    private Integer cancelCount;

    @ApiModelProperty("关闭数")
    @Excel(name = "关闭数", width = 20.0)
    private Integer closeCount;

    @ApiModelProperty("撤销数")
    @Excel(name = "撤销数", width = 20.0)
    private Integer backoutCount;

    @ApiModelProperty("收成率")
    @Excel(name = "收成率", width = 20.0)
    private String rate;

    public String getUserTypeText() {
        return ClerkUserTypeEnum.getDesc(this.userType);
    }

}
